var express = require('express');
var router = express.Router();
var sign =require('./sign.js');


exports.communicationprotocolList = function(req,res){
   var data=sign.delEmptyValue(req.body);
    sign.dataReq(req,data,req.session.apikey,'/sysmanage/communicationprotocol/list',"POST",function(ResData){
        if(ResData!=""){
            res.json(ResData);

        }
    });
}


exports.communicationprotocolEdit = function(req,res){
    sign.delEmptyValue(req.body); 
    sign.dataReq(req,req.body,req.session.apikey,'/sysmanage/communicationprotocol/edit',"POST",function(ResData){
        if(ResData!=""){
         res.json(ResData);
       
        }
    });
}

exports.communicationprotocolGet = function(req,res){
    sign.dataReq(req,req.body,req.session.apikey,'/sysmanage/communicationprotocol/getprotocol',"POST",function(ResData){
        if(ResData!=""){
         res.json(ResData);
        }
    });
}

exports.communicationprotocolDel = function(req,res){

    sign.dataReq(req,{"ids":[req.body.id]},req.session.apikey,'/sysmanage/communicationprotocol/del',"POST",function(ResData){
        if(ResData!=""){
         res.json(ResData);

        }
    });
}
